package com.myway.service.payment.Oceanpayment;

import com.myway.dto.common.ResultEntity;
import com.myway.dto.payment.oceanpayment.OceanpaymentParams;
import com.myway.pojo.FlyOrder;
import com.myway.pojo.TbcResultCode;

import java.util.Map;

/**
 * Created by qianmi-05 on 2018/9/19.
 */
public interface TBCPayService {

    public String TBCToPay(String orderid);

    public String callBackByTransId(String transId);

    public String addTbcPaymentInfo(String orderId,String transId,String  result,String result_code,String DSECURE,String RRN,String APPROVAL_CODE,String BANK_ID,String callBackResultStr,String firstTransId,String type);

    //根据订单的id 查询订单
    public FlyOrder selectByOrderId(String id);

    //根据返回码 查询错误原因
    public TbcResultCode getTbcResultCode(String resultCode);

    /*根据firstTransId查询订单*/
    public FlyOrder getOrderByFirstTransId(String transId);

    //修改订单支付时的状态
    public  boolean updateOrderPayInfo(String orderId,FlyOrder flyOrderInfo,String transId);

    //根据返回的lastTransId 和orderId 判断支付成功出票  支付失败返回
    public ResultEntity TbcOKCallBackOutTicket(String orderId, String  lastTransId);

    //解析根据transId返回的支付结果
    public Map<String, String> getParsingCallBackMap(String callBackResultStr);
}
